// 全局过滤器

// 过滤年月日 时分秒
export function YMDhms(date) {
    // 将数据转为时间格式
    let time = new Date(date)
    let Y = time.getFullYear()
    let M = time.getMonth() + 1
    let D = time.getDate()
    let h = time.getHours()
    let m = time.getMinutes()
    let s = time.getSeconds()
    let YMD = [Y, M, D].map(v => String(v).padStart(2, '0')).join('/')
    let hms = [h, m, s].map(v => String(v).padStart(2, '0')).join(':')
    return YMD + ' ' + hms
}